# -*- coding:utf-8 -*-
import HTMLTestRunner
import os
import time
import unittest

if __name__ == '__main__':
    # 通过正则路径加载
    suite = unittest.defaultTestLoader.discover(start_dir=os.getcwd()+"/script/",pattern="text02_login_api.py")

    f=open(os.getcwd()+r"/report/report-{}.html".format(time.strftime("%Y%m%d %H%M%S")),"wb")
    # 运行条件  使用第三方插件
    HTMLTestRunner.HTMLTestRunner(stream=f, verbosity=2, title="A3MAll接口自动化测试报告", description="....").run(suite)
    # 释放资源
    f.close()



